<?php
/**
 * 文件上传
 * Created by PhpStorm.
 * User: Administrator
 * Date: 14-4-10
 * Time: 下午2:40
 */
if(isset($_POST['upload'])){
    //引入文件上传类
    include './upload.php';
    $path = 'E:/utooo/method_library/upload_file/';
    $upload = new Upload($path);
    if($upload->run('uploadfile')){
        echo 'success';
    }else{
        echo 'faild';
    }
}else{
?>
<!doctype html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>文件上传</title>
</head>
<body>
    <form action="./index.php" enctype="multipart/form-data" method="post">
        <input type="hidden" name="MAX_FILE_SIZE" value="1111024000"/>
        <input type="file" name="uploadfile"/>
        <input type="submit" name="upload" value="上传"/>
    </form>
</body>
</html>
<?php
}
?>
